import request from '@/utils/request'

/**
 * 列表
 */
export const getCertification = (query) => {
        return request({
            url: '/Certification/',
            method: 'get',
            params: query
        })
    }
    /**
     * 认证岗位列表
     */
export const getPostCertification = (query) => {
        return request({
            url: '/PostCertification/',
            method: 'get',
            params: query
        })
    }
    /**
     * 证书列表
     */
export const getCertificate = (query) => {
    return request({
        url: '/Certificate/',
        method: 'get',
        params: query
    })
}


/**
 * 申请认证
 */
export const addCertification = (data) => {
    return request({
        url: '/Certification/',
        method: 'post',
        data: data
    })
}

/**
 * 详情
 * @param data
 */
export function certificationDetail(data) {
    return request({
        url: '/Certification/' + data + '/',
        method: 'get'
    })
}
/**
 * 岗位详情
 * @param data
 */
export function postCertificationDetail(data) {
    return request({
        url: '/PostCertification/' + data + '/',
        method: 'get'
    })
}
/**
 * 岗位修改
 * @param data
 */
export function UpdatePostCertification(data) {
    return request({
        url: '/PostCertification/' + data.id + '/',
        method: 'put',
        data: data

    })
}
/**
 * 岗位新增
 * @param data
 */
export function AddPostCertification(data) {
    return request({
        url: '/PostCertification/',
        method: 'post',
        data: data

    })
}
/**
 * 岗位删除
 * @param data
 */
export function DelPostCertification(id) {
    return request({
        url: '/PostCertification/' + id + '/',
        method: 'delete',


    })
}
/**
 * 审核
 * @param data
 */
export function certificationPass(data) {
    return request({
        url: '/Certification/' + data.id + '/',
        method: 'put',
        data: data
    })
}